import request from "../utils/request";

// 实验室集合
export const laboratoryList = () => {
    return request({
        method: 'POST',
        url: '/laboratory/findLaboratoryList'
    })
}
//查看学生报告列表
export const reportList = data => {
    return request({
        method: 'POST',
        url: '/report/findPageStudentReport',
        data
    })
}
//查看学生提交次数
export const reportNum = () => {
    return request({
        method: 'POST',
        url: '/report/reportNum'
    })
}
//学生查看模板
export const templateList = data => {
    return request({
        method: 'POST',
        url: '/template/findPageTemplate',
        data
    })
}
//学生上传报告
export const uploadReport = data => {
    return request({
        method: 'POST',
        url: '/report/addReport',
        data
    })
}
//根据id删除报告
export const deleteReportById = id => {
    return request({
        method: 'GET',
        url: '/report/deleteReport?id=' + id
    })
}
//根据id查看历史报告
export const historyReportById = id => {
    return request({
        method: 'GET',
        url: '/report/findReportLogById?id=' + id
    })
}
//学生更新报告
export const editReport = data => {
    return request({
        method: 'POST',
        url: '/report/updateReport',
        data
    })
}
//查看案例提交次数
export const caseNum = () => {
    return request({
        method: 'POST',
        url: '/recipe/recipeNum'
    })
}
//学生查看案例列表
export const caseList = data => {
    return request({
        method: 'POST',
        url: '/recipe/userFindPageRecipe',
        data
    })
}
//删除案例

export const deleteCaseById = id => {
    return request({
        method: 'GET',
        url: '/recipe/deleteRecipe?id=' + id
    })
}
//新增案例
export const addCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/addRecipe',
        data
    })
}
//案例历史版本
export const historyCaseById = id => {
    return request({
        method: 'GET',
        url: '/recipe/findRecipeLogById?id=' + id
    })
}
//更新案例版本
export const editCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/updateRecipe',
        data
    })
}
//通知消息
export const noticeList = data => {
    return request({
        method: 'POST',
        url: '/announcement/studentAnnouncementPage',
        data
    })
}
//教师查看柱状图 信息
export const lineList = data => {
    return request({
        method: 'POST',
        url: '/report/findReportNum',
        data
    })
}
//班级//无分页
export const classList = () => {
    return request({
        method: 'POST',
        url: '/class/findClassList'
    })
}
//教师查看报告
export const teacherList = data => {
    return request({
        method: 'POST',
        url: '/report/findPageReport',
        data
    })
}
// 教师报告评分
export const teacherScore = data => {
    return request({
        method: 'POST',
        url: '/report/addScores',
        data
    })
}
//添加模板
export const createTemplate = data => {
    return request({
        method: 'POST',
        url: '/template/addTemplate',
        data
    })
}
//删除模板
export const deleteTemplate = id => {
    return request({
        method: 'GET',
        url: '/template/deleteTemplate?id=' + id
    })
}
//查看版本日志
export const templateFile = id => {
    return request({
        method: 'GET',
        url: '/template/findTemplateLogById?id=' + id
    })
}
//更新模板
export const updateTemplate = data => {
    return request({
        method: 'POST',
        url: '/template/updateTemplate',
        data
    })
}
//系统案例
export const systemCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/findPageRecipe',
        data
    })
}
//教师查看学生案例
export const studentCase = data => {
    return request({
        method: 'POST',
        url: '/recipe/findPageStudentRecipe',
        data
    })
}
//教师审核
export const examineById = data => {
    return request({
        method: 'POST',
        url: '/recipe/updateStudentRecipe',
        data
    })
}
//教师查看公告
export const teacherNotice = data => {
    return request({
        method: 'POST',
        url: '/announcement/theaterAnnouncementPage',
        data
    })
}
//新增公告
export const addNotice = data => {
    return request({
        method: 'POST',
        url: '/announcement/addAnnouncement',
        data
    })
}
//编辑公告
export const editNotice = data => {
    return request({
        method: 'POST',
        url: '/announcement/editAnnouncement',
        data
    })
}
//删除公告
export const deleteNotice = id => {
    return request({
        method: 'GET',
        url: '/announcement/deleteAnnouncement?id=' + id
    })
}
//实验室分页
export const laboratoryPage = data => {
    return request({
        method: 'POST',
        url: '/laboratory/findPageLaboratory',
        data
    })
}
//删除实验室
export const deleteLaboratory = id => {
    return request({
        method: 'GET',
        url: '/laboratory/deleteLaboratory?id=' + id
    })
}
//查看当前实验室下面的实验员
export const downLaboratory = data => {
    return request({
        method: 'POST',
        url: '/laboratory/findPageLaboratoryNum',
        data
    })
}
//查看班级分页
export const classPage = data => {
    return request({
        method: 'POST',
        url: '/class/findClassPage',
        data
    })
}
//删除班级 !!!!!!!!
export const deleteClass = id => {
    return request({
        method: 'GET',
        url: '/class/deleteStudent?id=' + id
    })
}
//查看当前班级下的学生
export const classStudent = data => {
    return request({
        method: 'POST',
        url: '/class/findStudentClassPage',
        data
    })
}
//查询教师 学生
export const searchUserList = data => {
    return request({
        method: 'POST',
        url: '/user/findPageUser',
        data
    })
}
//删除账号
export const deleteUser = id => {
    return request({
        method: 'GET',
        url: '/user/deleteById?userId=' + id
    })
}
//分配班级
export const distributionClass = data => {
    return request({
        method: 'POST',
        url: '/user/setClass',
        data
    })
}
//分配实验室
export const distributionLaboratory = data => {
    return request({
        method: 'POST',
        url: '/user/assignment',
        data
    })
}
//新建教师
export const addTeacher = data => {
    return request({
        method: 'POST',
        url: '/user/addTheater',
        data
    })
}
//编辑教师
export const editTeacher = data => {
    return request({
        method: 'POST',
        url: '/user/editTheater',
        data
    })
}
//审核学生
export const examineStudent = data => {
    return request({
        method: 'POST',
        url: '/user/changeStatus',
        data
    })
}
//移除实验室
export const getOut = id => {
    return request({
        method: 'GET',
        url: '/laboratory/deleteById?id=' + id
    })
}
//移出班级
export const getOutClass = id => {
    return request({
        method: 'GET',
        url: '/class/removeStudent?id=' + id
    })
}
//添加实验室
export const addRoom = data => {
    return request({
        method: 'POST',
        url: '/laboratory/addLaboratory',
        data
    })
}
//编辑实验室
export const editRoom = data => {
    return request({
        method: 'POST',
        url: '/laboratory/editLaboratory',
        data
    })
}
//查询所有教师
export const getAllTeacher = () => {
    return request({
        method: 'GET',
        url: '/user/getTheaterList'
    })
}
//添加班级
export const addClass = data => {
    return request({
        method: 'POST',
        url: '/class/addClass',
        data
    })
}
//编辑班级
export const editClass = data => {
    return request({
        method: 'POST',
        url: '/class/editClass',
        data
    })
}

//查询案例类别
export const caseCategoryList = data => {
    return request({
        method: 'POST',
        url: '/classify/findPage',
        data
    })
}
//添加案例类别
export const addCaseCategory = data => {
    return request({
        method: 'POST',
        url: '/classify/add',
        data
    })
}
//删除案例类别
export const delCaseCategory = id => {
    return request({
        method: 'GET',
        url: '/classify/deleteById?id=' + id
    })
}
//编辑案例类别
export const editCaseCategory = data => {
    return request({
        method: 'POST',
        url: '/classify/edit',
        data
    })
}
//查询案例类别(无分页)
export const caseCategoryPage = () => {
    return request({
        method: 'POST',
        url: '/classify/findList',
    })
}
//x新建学生
export const addStudent = data => {
    return request({
        method: 'POST',
        url: '/user/addStudent',
        data
    })
}
